<?php

namespace App\Api\Controller;

use App\Http\Controllers\Controller;
use App\Models\Category;
use Illuminate\Http\Request;

class CategoryController extends BaseController
{
    public function index(Request $request)
    {
        $rows = Category::query()->selectRaw('id,title,sort')->orderBy('sort')->get()->toArray();
        return $this->sendData($rows);
    }
}
